{% extends "base_community.html" %}
{% load i18n %}

{% block layout_class %}column-container sidebar-right{% endblock %}

{% block content %}
  <h1>{% translate "Community" %}</h1>
  <h2 class="community-title">{% translate "Get Help" %}</h2>
  <div class="community-cta-wrapper">
    <a href="https://forum.djangoproject.com/" class="community-cta-a">
      <div class="community-cta">
        <div>
          {% include "svg_logos/forum.html" %}
        </div>
        <h3>{% translate "Forum - Post a question" %}</h3>
      </div>
    </a>
    <a href="https://chat.djangoproject.com" class="community-cta-a">
      <div class="community-cta">
        <div>
          {% include "svg_logos/discord.html" %}
        </div>
        <h3>{% translate "Discord - Chat with us" %}</h3>
      </div>
    </a>
  </div>

  <h2 class="community-title">{% translate "Third Party Packages" %}</h2>
  <div class="community-cta-wrapper">
    <a href="{% url "community-ecosystem" %}" class="community-cta-a">
      <div class="community-cta">
        <div>
          {% include "svg_logos/package.html" %}
        </div>
        <h3>{% translate "Package Ecosystem" %}</h3>
      </div>
    </a>
  </div>

  <h2 class="community-title">{% translate "Get Involved" %}</h2>
  <div class="community-cta-wrapper">
    <a href="https://docs.djangoproject.com/en/dev/internals/contributing/bugs-and-features/#reporting-bugs" class="community-cta-a">
      <div class="community-cta">
        <div>
          {% include "svg_logos/bug.html" %}
        </div>
        <h3>{% translate "Report an issue" %}</h3>
      </div>
    </a>
    <a href="https://docs.djangoproject.com/en/dev/internals/contributing/" class="community-cta-a">
      <div class="community-cta">
        <div>
          {% include "svg_logos/notepad.html" %}
        </div>
        <h3>{% translate "Contribute to Django" %}</h3>
      </div>
    </a>
    <a href="/community/local/" class="community-cta-a">
      <div class="community-cta">
        <div>
          {% include "svg_logos/world.html" %}
        </div>
        <h3>{% translate "Local Django Community" %}</h3>
      </div>
    </a>
  </div>

  <h2>{% translate "Django RSS feeds" %}</h2>
  <ul class="list-collapsing">
    {% for feedtype, latest_feeds in feedtype_list %}
      <li id="{{ feedtype.slug }}">
        <h2 class="bullet-icon"><i class="icon icon-rss blue"></i> {{ feedtype.name }}</h2>
        <div class="collapsing-content">
          <dl class="list-links">
            {% for item in latest_feeds %}
              <dt><a href="{{ item.link }}">{{ item.title }}</a></dt>
              <dd>
                {% blocktranslate trimmed with modified_date=item.date_modified|date:"DATETIME_FORMAT" public_url=item.feed.public_url title=item.feed.title %}
                  {{ modified_date }} by <a href="{{ public_url }}">{{ title }}</a>
                {% endblocktranslate %}
              </dd>
            {% endfor %}
          </dl>
          <p class="meta">
            {% if latest_feeds %}
              <a href="{% url 'community-feed-list' feedtype.slug %}">{% translate "View more" %}</a>
            {% endif %}
            {% if latest_feeds and feedtype.can_self_add %}
              {% translate "or" context "view more OR add your feed" %}
            {% endif %}
            {% if feedtype.can_self_add %}
              <a href="{% url 'community-add-feed' feedtype.slug %}">{% translate "Add your feed" %}</a>
            {% endif %}
          </p>
        </div>
      </li>
    {% endfor %}
  </ul>
{% endblock %}
